//
//  About.m
//  AboutDemo
//
//  Created by bosma on 14-3-19.
//  Copyright (c) 2014年 cn.com.bosma. All rights reserved.
//

#import "About.h"
#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

@interface About ()

@end

@implementation About

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    UIBarButtonItem * rightBtn = [[UIBarButtonItem alloc]initWithTitle:@"手机访问" style:UIBarButtonItemStylePlain target:self action:@selector(clickWeb:)];
    self.navigationItem.rightBarButtonItem = rightBtn;
    self.navigationItem.title = @"关于我们";
    
    if (IS_IPHONE_5) {
        self.lblVersion.center = CGPointMake(self.lblVersion.center.x, self.lblVersion.center.y + 88);
        self.lblOSC.center = CGPointMake(self.lblOSC.center.x, self.lblOSC.center.y + 88);
        self.lblCopyright.center = CGPointMake(self.lblCopyright.center.x, self.lblCopyright.center.y + 88);
        self.img.image = [UIImage imageNamed:@"aboutbg1136.jpg"];
    }

}

- (void)clickWeb:(id)sender
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://m.oschina.net"]];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
